package com.hoapital.outpbillwork.module.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hoapital.outpbillwork.module.entity.OutpDiagnosis;
import com.hoapital.outpbillwork.module.entity.OutpMedrec;
import com.hoapital.outpbillwork.module.mapper.OutpDiagnosisMapper;
import com.hoapital.outpbillwork.module.mapper.OutpMedrecMapper;
import com.hoapital.outpbillwork.module.service.OutpMedrecService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * ÃÅÕï²¡Àú¿â 服务实现类
 * </p>
 *
 * @author lvyao
 * @since 2021-12-22
 */
@Service
public class OutpMedrecServiceImpl extends ServiceImpl<OutpMedrecMapper, OutpMedrec> implements OutpMedrecService {
    @Resource
    private OutpMedrecMapper outpMedrecMapper;

    @Resource
    private OutpDiagnosisMapper outpDiagnosisMapper;
    @Override
    public boolean insertAll(OutpMedrec outpMedrec, List<OutpDiagnosis> outpDiagnosisList) {
        Integer insert = outpMedrecMapper.insert(outpMedrec);
        for (OutpDiagnosis outpDiagnosis : outpDiagnosisList) {
            Integer insert1 = outpDiagnosisMapper.insert(outpDiagnosis);
        }
        return true;
    }
}
